local unpack=unpack
loadmod("mcl")
local mcl=mcl
local DeleteTrigger=DeleteTrigger
module("hooks")
list={}
arglist={}
hashook=function()
	if list[str]==nil then
		return false
	else
		return true
	end
end

hook=function(str,callback,...)
	list[str]=callback
	if callback==nil then
		arglist[str]=nil
	else
		arglist[str]={...}
	end
end

unhookall=function()
	list={}
	arglist={}
end

callhook=function(str,removehook)
	local thook=list[str]
	local thookarg=arglist[str]
	if removehook==true then
		hook(str,nil)
	end
	if thookarg~=nil then
		call(thook,unpack(thookarg))
	else
		call(thook)
	end
end

call=function(func,...)
	if (func~=nil) then
		func(...)
	end
end






callback={}
callback.discon=function()
end
callback.open=function()
end
callback.loaded=function()
	DeleteTrigger("scriptloaded")
	mcl.getfilenameinfo()
end